//全局的ajax访问，处理ajax清求时异常
$.ajaxSetup({
    contentType: "application/x-www-form-urlencoded;charset=utf-8",
    complete: function (XMLHttpRequest, textStatus) {
        //通过XMLHttpRequest取得响应结果
        let res = XMLHttpRequest.responseText;
        try {
            let jsonData = JSON.parse(res);
            if (jsonData.code == 10009) {
                window.location.replace("/login.html");
            } else if (jsonData.code != 0) {
                msgUtil.error(jsonData.msg)
            } else {
                //正常情况就不统一处理了
            }
        } catch (e) {
        }
    }
});